
options(scipen=20)

library(MASS)
library(WhatIf)
library(RColorBrewer)
library(simcf)
library(verification)
library(foreign)
library(nnet)
library(xtable)
library(apsrtable)
library(ggplot2)
library(dplyr)
library(stargazer)
col <- brewer.pal(3,"Dark2")

anes<-read.dta("anes.dta")
wanes<-anes [ which(anes$nonwhite==0), ]
nwanes<-anes[ which(anes$nonwhite==1), ]

ncps<-read.dta("ncps.dta")
wncps<-ncps[ which(ncps$nonwhite==0), ]
nwncps<-ncps[ which(ncps$nonwhite==1), ]


# NCPS #

# total population #
m1<-glm(voted~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode+nonwhite, 
        family="binomial",data=ncps,weights=weight)

m2<-glm(elect~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode+nonwhite, 
        family="binomial",data=ncps,weights=weight)

m3<-glm(petition~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode+nonwhite, 
        family="binomial",data=ncps,weights=weight)

m4<-glm(community~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode+nonwhite, 
        family="binomial",data=ncps,weights=weight)

m5<-glm(meeting~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode+nonwhite, 
        family="binomial",data=ncps,weights=weight)

m6<-glm(org~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode+nonwhite, 
        family="binomial",data=ncps,weights=weight)

m7<-glm(letter~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode+nonwhite, 
        family="binomial",data=ncps,weights=weight)

m8<-glm(donate~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode+nonwhite, 
        family="binomial",data=ncps,weights=weight)

m9<-glm(dem~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode+nonwhite, 
        family="binomial",data=ncps,weights=weight)


stargazer(m1,m2,m3, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among all respondents in the NCPS",
          covariate.labels=c("Proximal",
                             "Sense of Injustice",
                             "Personal",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent","Mode","Nonwhite",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Voted 2012","Campaign","Petition"),
          out = "ncps_aptab1.tex",
          dep.var.labels   = (""))

stargazer(m4,m5,m6, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among all respondents in the NCPS",
          covariate.labels=c("Proximal",
                             "Sense of Injustice",
                             "Personal",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent","Mode","Nonwhite",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Community Meeting","Political Meeting","Organization"),
          out = "ncps_aptab2.tex",
          dep.var.labels   = (""))

stargazer(m7,m8,m9, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among all respondents in the NCPS",
          covariate.labels=c("Proximal",
                             "Sense of Injustice",
                             "Personal",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent","Mode","Nonwhite",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Letter","Donate","Protest"),
          out = "ncps_aptab3.tex",
          dep.var.labels   = (""))


# White #

m1<-glm(voted~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode, 
        family="binomial",data=wncps)

m2<-glm(elect~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode, 
        family="binomial",data=wncps)

m3<-glm(petition~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode, 
        family="binomial",data=wncps)

m4<-glm(community~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode, 
        family="binomial",data=wncps)

m5<-glm(meeting~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode, 
        family="binomial",data=wncps)

m6<-glm(org~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode,
        family="binomial",data=wncps)

m7<-glm(letter~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode, 
        family="binomial",data=wncps)

m8<-glm(donate~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode, 
        family="binomial",data=wncps)

m9<-glm(dem~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode, 
        family="binomial",data=wncps)


stargazer(m1,m2,m3, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among whites in the NCPS",
          covariate.labels=c("Proximal",
                             "Sense of Injustice",
                             "Personal",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent","Mode",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Voted 2012","Campaign","Petition"),
          out = "ncps_aptab4.tex",
          dep.var.labels   = (""))


stargazer(m4,m5,m6, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among whites in the NCPS",
          covariate.labels=c("Proximal",
                             "Sense of Injustice",
                             "Personal",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent","Mode",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Community Meeting","Political Meeting","Organization"),
          out = "ncps_aptab5.tex",
          dep.var.labels   = (""))

stargazer(m7,m8,m9, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among whites in the NCPS",
          covariate.labels=c("Proximal",
                             "Sense of Injustice",
                             "Personal",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent","Mode",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Letter","Donate","Protest"),
          out = "ncps_aptab6.tex",
          dep.var.labels   = (""))


# Nonwhite #

m1<-glm(voted~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode, 
        family="binomial",data=nwncps)

m2<-glm(elect~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode, 
        family="binomial",data=nwncps)

m3<-glm(petition~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode, 
        family="binomial",data=nwncps)

m4<-glm(community~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode, 
        family="binomial",data=nwncps)

m5<-glm(meeting~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode, 
        family="binomial",data=nwncps)

m6<-glm(org~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode,
        family="binomial",data=nwncps)

m7<-glm(letter~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode, 
        family="binomial",data=nwncps)

m8<-glm(donate~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode, 
        family="binomial",data=nwncps)

m9<-glm(dem~prox2+cpi+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+mode, 
        family="binomial",data=nwncps)


stargazer(m1,m2,m3, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among nonwhites in the NCPS",
          covariate.labels=c("Proximal",
                             "Sense of Injustice",
                             "Personal",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent","Mode",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Voted 2012","Campaign","Petition"),
          out = "ncps_aptab7.tex",
          dep.var.labels   = (""))


stargazer(m4,m5,m6, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among nonwhites in the NCPS",
          covariate.labels=c("Proximal",
                             "Sense of Injustice",
                             "Personal",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent","Mode",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Community Meeting","Political Meeting","Organization"),
          out = "ncps_aptab8.tex",
          dep.var.labels   = (""))


stargazer(m7,m8,m9, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among nonwhites in the NCPS",
          covariate.labels=c("Proximal",
                             "Sense of Injustice",
                             "Personal",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent","Mode",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Letter","Donate","Protest"),
          out = "ncps_aptab9.tex",
          dep.var.labels   = (""))


### ANES ###
# total population #
m1<-glm(voted~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+nonwhite, 
        family="binomial",data=anes,weights=weight)

m2<-glm(petition~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+nonwhite, 
        family="binomial",data=anes,weights=weight)

m3<-glm(community~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+nonwhite, 
        family="binomial",data=anes,weights=weight)

m4<-glm(meet~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+nonwhite, 
        family="binomial",data=anes,weights=weight)

m5<-glm(volunteer~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+nonwhite, 
        family="binomial",data=anes,weights=weight)

m6<-glm(official~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+nonwhite, 
        family="binomial",data=anes,weights=weight)

m7<-glm(don_soc~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+nonwhite, 
        family="binomial",data=anes,weights=weight)

m8<-glm(don_rel~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+nonwhite, 
        family="binomial",data=anes,weights=weight)

m9<-glm(protest~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent+nonwhite, 
        family="binomial",data=anes,weights=weight)


stargazer(m1,m2,m3, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among all respondents in the ANES",
          covariate.labels=c("Proximal",
                             "Discrimination",
                             "Personal",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent","Nonwhite",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Voted 2012","Petition","Community Work"),
          out = "anes_aptab1.tex",
          dep.var.labels   = (""))

stargazer(m4,m5,m6, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among all respondents in the ANES",
          covariate.labels=c("Proximal",
                             "Discrimination",
                             "Personal",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent","Nonwhite",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Community Meeting","Volunteer","Contacted Official"),
          out = "anes_aptab2.tex",
          dep.var.labels   = (""))



stargazer(m7,m8,m9, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among all respondents in the ANES",
          covariate.labels=c("Proximal",
                             "Discrimination",
                             "Personal",
                             "Sense of Injustice",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent","Nonwhite",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Donate, Social","Donate, Religious","Protest"),
          out = "anes_aptab3.tex",
          dep.var.labels   = (""))


# White #


m1<-glm(voted~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent, 
        family="binomial",data=wanes, weights=weight)

m2<-glm(petition~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent, 
        family="binomial",data=wanes, weights=weight)

m3<-glm(community~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent, 
        family="binomial",data=wanes,weights=weight)

m4<-glm(meet~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent, 
        family="binomial",data=wanes,weights=weight)

m5<-glm(volunteer~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent, 
        family="binomial",data=wanes,weights=weight)

m6<-glm(official~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent,
        family="binomial",data=wanes,weights=weight)

m7<-glm(don_soc~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent, 
        family="binomial",data=wanes,weights=weight)

m8<-glm(don_rel~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent, 
        family="binomial",data=wanes)

m9<-glm(protest~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent, 
        family="binomial",data=wanes,weights=weight)


stargazer(m1,m2,m3, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among whites in the ANES",
          covariate.labels=c("Proximal",
                             "Discrimination",
                             "Personal",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Voted 2012","Petition","Community Work"),
          out = "anes_aptab4.tex",
          dep.var.labels   = (""))

stargazer(m4,m5,m6, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among whites in the ANES",
          covariate.labels=c("Proximal",
                             "Discrimination",
                             "Personal",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Community Meeting","Volunteer","Contacted Official"),
          out = "anes_aptab5.tex",
          dep.var.labels   = (""))



stargazer(m7,m8,m9, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among whites in the ANES",
          covariate.labels=c("Proximal",
                             "Discrimination",
                             "Personal",
                             "Sense of Injustice",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Donate, Social","Donate, Religious","Protest"),
          out = "anes_aptab6.tex",
          dep.var.labels   = (""))


# Nonwhite #

m1<-glm(voted~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent, 
        family="binomial",data=nwanes,weights=weight)

m2<-glm(petition~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent, 
        family="binomial",data=nwanes,weights=weight)

m3<-glm(community~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent, 
        family="binomial",data=nwanes,weights=weight)

m4<-glm(meet~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent, 
        family="binomial",data=nwanes,weights=weight)

m5<-glm(volunteer~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent, 
        family="binomial",data=nwanes,weights=weight)

m6<-glm(official~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent,
        family="binomial",data=nwanes,weights=weight)

m7<-glm(don_soc~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent, 
        family="binomial",data=nwanes,weights=weight)

m8<-glm(don_rel~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent, 
        family="binomial",data=nwanes,weights=weight)

m9<-glm(protest~prox2+disc+pers+inteff+female+young+old+edu4+inc40+inc60+inc80+inc100+inc101+incmis+
          polint+church+republican+independent, 
        family="binomial",data=nwanes,weights=weight)


stargazer(m1,m2,m3, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among nonwhites in the ANES",
          covariate.labels=c("Proximal",
                             "Discrimination",
                             "Personal",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Voted 2012","Petition","Community Work"),
          out = "anes_aptab7.tex",
          dep.var.labels   = (""))

stargazer(m4,m5,m6, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among nonwhites in the ANES",
          covariate.labels=c("Proximal",
                             "Discrimination",
                             "Personal",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Community Meeting","Volunteer","Contacted Official"),
          out = "anes_aptab8.tex",
          dep.var.labels   = (""))



stargazer(m7,m8,m9, no.space=TRUE,
          font.size="footnotesize",
          title="The impact of contact and injustice on participation, among nonwhites in the ANES",
          covariate.labels=c("Proximal",
                             "Discrimination",
                             "Personal",
                             "Sense of Injustice",
                             "Political Efficacy",
                             "Female","Age: 18-34","Age: 65+",
                             "Education","20k-40k","40k-60k","60k-80k",
                             "80k-100k","100k+","Missing Income",
                             "Political Interest","Church Attendance",
                             "Republican","Independent",
                             "Constant"),
          dep.var.labels.include = FALSE,
          model.numbers=FALSE,
          star.cutoffs = c(0.05, 0.01, 0.001),
          column.labels = c("Donate, Social","Donate, Religious","Protest"),
          out = "anes_aptab9.tex",
          dep.var.labels   = (""))